﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.IO.IsolatedStorage;

namespace DenpaMap
{
    public partial class Setting : PhoneApplicationPage
    {
        IsolatedStorageSettings store = IsolatedStorageSettings.ApplicationSettings;
        public Setting()
        {
            InitializeComponent();
        }

        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            if (store.Contains("policy"))
            {
                checkBox1.IsChecked = (bool)store["policy"];
            }
        }



        protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
        {
            store["policy"] = checkBox1.IsChecked;
            store.Save();
            base.OnNavigatedFrom(e);
        }
    }
}